package cn.wing.container;

import net.minecraft.world.SimpleContainer;

public class AutoDirtyContainer extends SimpleContainer {
    private final Runnable onDirty;

    public AutoDirtyContainer(int size, Runnable onDirty) {
        super(size);
        this.onDirty = onDirty;
    }

    @Override
    public void setChanged() {
        super.setChanged();
        onDirty.run();
    }
}